package com.bitcs.accesscontrol.dao.entity;

import java.util.Date;

/**
 * @author GeChen
 * @Description 对应POJO表
 * @date 2019/11/12 16:38
 */
public class AccessControlPO {
    /**
     * 主键id
     */
    private Integer id;
    /**
     * appId
     */
    private String appId;
    /**
     * 调用服务类型
     */
    private String type;
    /**
     * 开始时间
     */
    private Date startTime;
    /**
     * 过期时间
     */
    private Date expiredTime;
    /**
     * 剩余次数
     */
    private int remainCount;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getExpiredTime() {
        return expiredTime;
    }

    public void setExpiredTime(Date expiredTime) {
        this.expiredTime = expiredTime;
    }

    public int getRemainCount() {
        return remainCount;
    }

    public void setRemainCount(int remainCount) {
        this.remainCount = remainCount;
    }

    @Override
    public String toString() {
        return "AccessControlPO{" +
                "id=" + id +
                ", appId='" + appId + '\'' +
                ", type='" + type + '\'' +
                ", startTime=" + startTime +
                ", expiredTime=" + expiredTime +
                ", remainCount=" + remainCount +
                '}';
    }

    public static class Const {
        /**
         * 按时长收费的次数
         */
        public static int CHARGED_BY_TIME_COUNT = -5;
    }
}
